package org.exhaust.framework.net.test.protocol.client.tcp.handler;

import io.netty.channel.Channel;
import org.exhaust.framework.net.client.tcp.handler.auth.AuthChannelEventHandler;
import org.exhaust.framework.net.test.protocol.client.tcp.client.LoginRequest;

public class AuthEventHandler extends AuthChannelEventHandler {

    private String id;

    public AuthEventHandler(String id) {
        this.id = id;
    }

    @Override
    public void auth(Channel channel) {
        LoginRequest loginRequest = new LoginRequest(id);
        channel.writeAndFlush(loginRequest);
    }
}
